﻿using System;
using HigLabo.Net.Extensions;

namespace HigLabo.Net.WindowsLive
{
    /// <summary>
    /// 
    /// </summary>
    public class UserAddress : ResponseObject
    {
        /// <summary>
        /// 
        /// </summary>
        public String Street { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public String Street2 { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public String City { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public String State { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public String PostalCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public String Region { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="jsonText"></param>
        public UserAddress(String jsonText)
        {
            this.SetProperty(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="jsonText"></param>
        public override void SetProperty(String jsonText)
        {
            var d = this.SetData(jsonText);
            this.Street = d.ToString("street");
            this.Street2 = d.ToString("street_2");
            this.City = d.ToString("city");
            this.State = d.ToString("state");
            this.PostalCode = d.ToString("postal_code");
            this.Region = d.ToString("region");
        }
    }
}
